from functools import reduce

from unicodedata import numeric

# while True:
#     tmp = input("请输入带有符号的温度:")
#
#     if tmp[-1] in ['f', 'F']:
#         C = (eval(tmp[0:-1]) - 32) / 1.8
#         print("转换后的温度为{:.2f}C".format(C))
#     elif tmp[-1] in ['c', 'C']:
#         F = eval(tmp[0:-1]) * 1.8 + 32
#         print("转换后的温度为{:.2f}C".format(F))
#     else:
#         print("输入错误")
#
#






# # 第一种方法
# lis= [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# lis[3][2][1][0] ='TT'
# for i in lis:
#     print(i)
#
# # #第二种方法
# lis= [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# for i in range(len(lis[3][2][1])):
#     if lis[3][2][1][i]=='tt':
#         lis[3][2][1][i]='TT'
#         break
# for i in lis:
#     print(i)
# print('\n\n')
#
# #直接修改
# lis = [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# lis[1]='100'
# lis[3][2][1][1]='100'
# for i in lis:
#     print(i)
# print('\n\n')
#
# #遍历修改
# lis = [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# for i in range(len(lis)):
#     if lis[i]==3:
#         lis[i]='100'
#         break
# for i in range(len(lis[3][2][1])):
#     if lis[3][2][1][i]==3:
#         lis[3][2][1][i]='100'
#         break
# for i in lis:
#     print(i)
#
#
#
# #直接修改
# lis = [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# lis[3][2][1][2] =101
# for i in lis:
#     print(i,end=' ')
# print('\n')
#
#
# #递归修改
# def Set(lis):
#          for i in range(len(lis)):
#              if type(lis[i])==list:
#                  Set(lis[i])
#              else:
#                  if lis[i]=='1':
#                      lis[i]=101
# lis = [2, 3, 'k', ['qwe', 20, ['k', ['tt', 3, '1']], 89], 'ab', 'adv']
# Set(lis)
# for i in lis:
#     print(i,end=' ')
# print('\n')

# li = ['taibai', 'alexC', 'Abc ', 'egon', 'Ritian', 'Wusir', '  aqC' ]
# for i in range(len(li)):
#         li[i]=li[i].replace(' ', '')
# for i in li:
#     print(i,end='')

# li = ['taibai', 'alexC', 'Abc ', 'egon', 'Ritian', 'Wusir', '  aqC' ]
# new = []
# for i in li:
#     if(i[0]=='R'or i[0]=='a')and i[-1]=='C':
#         new.append(i)
#
#
# for i in new:
#      print(i,end='')


# str="给定一段话“数据挖掘利用了来自如下一些领域的思想：(a) 来自统计学的抽样、估计和假设检验，(b)人工智能、模式识别和机器学习的搜索算法、建模技术和学习理论。数据挖掘也迅速地接纳了来自其他领域的思想，这些领域包括最优化、进化计算、信息论、信号处理、可视化和信息检索。一些其他领域也起到重要的支撑作用。特别地，需要数据库系统提供有效的存储、索引和查询处理支持。源于高性能（并行）计算的技术在处理海量数据集方面常常是重要的。分布式技术也能帮助处理海量数据，并且当数据不能集中到一起处理时更是至关重要。"
# str = str.replace("数据挖掘","data mining")
# print(str)

# for i in range(1,10):
#     k=1
#     for j in range(1,i+1):
#         print(k, "*", i, "=", i * k, end="  ")
#         k+=1
#     print("\n")

# num = input()
# num = int(num)
# sum = 0
#
# while num>0:
#     sum+=int(num%10)
#     num/=10
#
# print(sum)



arr2=[{1,2},{1,2},{3,4},{4,5,6},{1,2,3,4}]
union_set = reduce(lambda x, y: x.union(y), arr2)
print(union_set)

# str="Alice-Tom-Eric-Lisa"
# arr=str.split('-')
# str = arr[0]+"+"+arr[-1]
# print(str)

# def format_output(value):
#     # 将值转换为字符串
#     value_str = str(value)
#     # 如果长度小于30，则进行格式化；否则保持原样
#     if len(value_str) < 30:
#         formatted_str = value_str.rjust(30, '+')
#     else:
#         formatted_str = value_str
#     return formatted_str
#
# import math
# num = input()
# num=int(num)
# num = math.sqrt(num)
# num = round(num,3)
# str = format_output(str(num))
# print(str)












